<div id="commentForm">
    <script type="text/javascript" language="javascript" src="messageform.js"></script>
    <form name="inputform" method="post" action="<%= strActionURL %>">
        <input name="_csrf" type="hidden" value="<%- ctx.csrf %>" />
        <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="formbox-comment">
            <tr>
                <td colspan="2" class="formbox-comment-title"><%= helper.HTMLEncodeLite(strTitle) %></td>
            </tr>
            <tr>
                <td class="formbox-comment-rowheader" width="140">
                    <div class="panel-smilies">
                        <div class="panel-smilies-title"><%= __('smilies') %></div>
                        <div class="panel-smilies-content">
                            <% for(var i = 0;i < theCache.smilies.length;i++){ %>
                                <a href="javascript:insertSmilies('<%= theCache.smilies[i].code %>')"><img
                                            src="<%= theCache.settings["smiliesFolder"] %>/<%= theCache.smilies[i].image %>"
                                            alt="<%= theCache.smilies[i].code %>"/></a>
                                <% if((i + 1) % theCache.settings["smiliesPerRow"] == 0) { %> <br /> <% } %>
                            <% } %>
                        </div>
                    </div>
                    <div style="font-weight: normal; text-align:left;">
                        <input name="e_ubb" type="checkbox" value="true"
                                <% if(strUBBFlags.substr(0, 1) == "1") { %> checked="checked"<% } %>
                        /> <%= __('e_ubb') %><br/>
                        <input name="e_autourl" type="checkbox" value="true"
                                <% if(strUBBFlags.substr(1, 1) == "1") { %> checked="checked"<% } %>
                        /> <%= __('e_autourl') %><br/>
                        <input name="e_smilies" type="checkbox" value="true"
                                <% if(strUBBFlags.substr(4, 1) == "1") { %> checked="checked"<% } %>
                        /> <%= __('e_smilies') %><br/>
                        <input name="comm_hidden" type="checkbox" value="true"
                                <% if(bHidden) { %> checked="checked"<% } %>
                        /> <%= __('comm_hidden') %>
                    </div>
                </td>
                <td class="formbox-comment-content" valign="top">
                    <% if(!theUser.loggedIn){ %>
                        <div style="padding-bottom:5px">
                            <%= __('username') %>: <input name="comm_username" type="text" size="12"
                                                            maxlength="24" class="text"/>&nbsp;
                            <%= __('password') %>: <input name="comm_password" type="password" size="12"
                                                            maxlength="16" class="text"/>&nbsp;
                            <% if(theCache.settings["enableRegister"] == 1){ %>
                                <input name="comm_register" type="checkbox" value="true"/> <%= __('reg_now') %>?
                            <% } %>
                        </div>
                    <% } %>
                    <% if(theCache.settings["enableSecurityCode"] == 1){ %>
                        <div style="padding-bottom:5px">
                            <input name="scode" size="4" maxlength="4" type="text" class="text"/>
                            <img src="scode.asp" alt="<%= __('scode') %>"/>
                            <span class="comment-text">* <%= __('scode_req') %></span>
                        </div>
                    <% } %>
                    <% if(!bShowReplyArea){ %>
                        <textarea name="message" cols="64" rows="10" id="message" style="width:100%"
                                  onselect="storeCaret(this);" onclick="storeCaret(this);"
                                  onkeyup="storeCaret(this);CtrlEnter();"><%= helper.HTMLEncodeLite(
                                    strContent) %></textarea>
                    <% }else{ %>
                        <textarea name="entry" cols="64" rows="10" id="entry" style="width:100%"
                                  onkeyup="CtrlEnter();"><%= helper.HTMLEncodeLite(strContent) %></textarea>
                        <textarea name="message" cols="64" rows="10" id="message" style="width:100%"
                                  onselect="storeCaret(this);" onclick="storeCaret(this);"
                                  onkeyup="storeCaret(this);CtrlEnter();"><%= helper.HTMLEncodeLite(
                                    strReply) %></textarea>
                    <% } %>
                    <% if(theUser.rights["upload"] > 0 && theCache.settings["enableUpload"] == 1){ %>
                        <div>
                            <iframe frameborder="0" height="21" marginheight="0" marginwidth="0" scrolling="no"
                                    width="100%" src="upload.asp"></iframe>
                        </div>
                    <% } %>
                    <div style="padding-top:10px">
                        <input type="submit" name="btnSubmit" value=" <%= __('post_comment') %> "
                               onclick="this.disabled=true;document.inputform.submit();" class="button"/>&nbsp;
                        <input name="Reset" type="reset" value=" <%= __('reset') %> " class="button"/>
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
